import type { FormRules } from "element-plus";
import { reactive } from "vue";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  patentName: [{ required: true, message: "请输入", trigger: "blur" }],
  patentNumber: [{ required: true, message: "请输入", trigger: "blur" }],
  patentType: [{ required: true, message: "请选择", trigger: "change" }],
  firstInventorType: [{ required: true, message: "请选择", trigger: "change" }],
  firstInventor: [{ required: true, message: "请输入", trigger: "blur" }],
  secondInventorType: [
    { required: true, message: "请选择", trigger: "change" }
  ],
  secondInventor: [{ required: true, message: "请输入", trigger: "blur" }],
  patentee: [{ required: true, message: "请输入", trigger: "blur" }],
  sendDate: [{ required: true, message: "请选择", trigger: "change" }],
  belongCountry: [{ required: true, message: "请选择", trigger: "change" }],
  acceptanceDate: [{ required: true, message: "请选择", trigger: "change" }]
});
